#include <iostream>
#include <cmath>
using namespace std;
using ll = long long;

int main(){
    ll x; cin >> x;
    ll l = pow((int)sqrt(x), 2);
    ll r = pow((int)sqrt(x) + 1, 2);
    cout << (abs(l - x) > abs(r - x) ? r : l) << endl;
    return 0;
}
